export default {
	namespaced: true, // 开启命名空间
	state: {
		num: 100,
		age: 10
	},
	getters: {
		getNum: (state) => state.num + 20,
		getAge: (state) => state.age / 2
	},
	mutations: {
		PLUS: (state) => {
			state.num += 10
		},
		MITT: (state) => {
			state.num -= 10
		}
	},
	actions: {
		onMitt: ({ commit }) => {
			commit('MITT')
		}
	}
}
